package com.we.risk.phoneRecord.tools;

import com.alibaba.fastjson.JSONObject;
import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.util.Set;

public class ResJsonCompare {

    public static void main(String[] args) throws IOException {
        File file1103 =
                new File("/Users/jk/Downloads/风控实时标签需求/通话记录-loulingbo/data_compare/new.json");
        File file1104 =
                new File(
                        "/Users/jk/Downloads/风控实时标签需求/通话记录-loulingbo/data_compare/modify-number.json");

        String input1103 = FileUtils.readFileToString(file1103);
        String input1104 = FileUtils.readFileToString(file1104);

        JSONObject json1103 = JSONObject.parseObject(input1103);
        JSONObject json1104 = JSONObject.parseObject(input1104);

        Set<String> keySets = json1103.keySet();
        for (String key : keySets) {
            String val1103 = json1103.getString(key);
            String val1104 = json1104.getString(key);

            if (!val1103.equals(val1104)) {
                System.out.println("Key: " + key + " new: " + val1103 + " 1104: " + val1104);
            }
        }
    }
}
